<?php

namespace common\model;

use think\model\RelationModel;

class EpisodeAllocationModel extends RelationModel
{

    //自动验证
    protected $_validate = [
        ['user_id', '', '', self::MUST_VALIDATE, 'require'],
        ['user_id', '', '', self::MUST_VALIDATE, 'integer'],
        ['role_code', '', '', self::MUST_VALIDATE, 'require'],
        ['entity_id', '', '', self::MUST_VALIDATE, 'require'],
        ['entity_id', '', '', self::MUST_VALIDATE, 'integer'],
    ];

    //自动完成
    protected $_auto = [
        ['uuid', 'create_uuid', self::MODEL_INSERT, 'function'],
        ['created_by', 'fill_created_by', self::MODEL_INSERT, 'function'],
        ['created', 'time', self::MODEL_INSERT, 'function'],
        ['project_id', 'auto_fill_project_id', self::MODEL_INSERT, 'function_with_data'],
    ];

}
